package com.ruoyi.system.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.dto.MatchDTO;
import com.ruoyi.system.service.MatchService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

/**
 * @author Ly lilongfei
 * @date 2024/9/26
 * @Description
 */
@RestController
public class MatchController {

    @Resource
    private MatchService matchService;


    @PostMapping("/createMatch")
    public AjaxResult createMatch(@RequestBody MatchDTO matchDTO){
        matchService.createNewMatch(matchDTO);
        return AjaxResult.success("创建比赛成功");
    }

}
